<?php
/**
 * test ajax request, return request params as json
 * @package    brand
 * @author     ben
 */
class ajaxTestAction extends sfAction
{
    public function execute($request)
    {
        //$this->forward404Unless($request->hasParameter('id'));
        $output = '';
        $resultSet = JsCommonData::getCommonDatum();
//        $resultSet['info'] = JsCommonData::getSuccessDatum();
       
        $resultSet['info'] = JsCommonData::getErrorDatum(WacErrorCode::getInfo(WacErrorCode::$duplicatedName, 'code'), WacErrorCode::$duplicatedName);

        $resultSet["items"] = $this->getRequest()->getParameterHolder()->getAll();
        
        return OutputHelper::getInstance()->outputJsonOrTextFormat($resultSet, $this);
    }
}